﻿CREATE TABLE [dbo].[ApptAttnLog]
(
	[Id] BIGINT NOT NULL PRIMARY KEY IDENTITY, 
    [OrderId] BIGINT NULL, 
	[BkMemberId] BIGINT NULL,
	[WxUserId] BIGINT NULL,
    [CardNo] NVARCHAR(50) NULL, 
    [PatientName] NVARCHAR(50) NULL, 
    [HospName] NVARCHAR(50) NULL, 
    [DeptName] NVARCHAR(50) NULL, 
    [RegDate] NVARCHAR(20) NULL, 
    [TimeSlice] NVARCHAR(20) NULL, 
    [SendTime1] DATETIME NULL, 
    [SendTime2] DATETIME NULL, 
    [NeedToSendTime1] DATETIME NULL, 
    [NeedToSendTime2] DATETIME NULL, 
    [SendTimes] INT NULL, 
    [RecCreateDt] DATETIME NULL, 
    [RecUpdateDt] DATETIME NULL
)

GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'预约订单ID',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ApptAttnLog',
    @level2type = N'COLUMN',
    @level2name = 'OrderId'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'卡号',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ApptAttnLog',
    @level2type = N'COLUMN',
    @level2name = N'CardNo'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'姓名',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ApptAttnLog',
    @level2type = N'COLUMN',
    @level2name = N'PatientName'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'医院名称',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ApptAttnLog',
    @level2type = N'COLUMN',
    @level2name = N'HospName'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'科室名称',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ApptAttnLog',
    @level2type = N'COLUMN',
    @level2name = N'DeptName'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'就诊日期',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ApptAttnLog',
    @level2type = N'COLUMN',
    @level2name = N'RegDate'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'时间段',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ApptAttnLog',
    @level2type = N'COLUMN',
    @level2name = N'TimeSlice'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'发送时间1',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ApptAttnLog',
    @level2type = N'COLUMN',
    @level2name = N'SendTime1'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'发送时间2',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ApptAttnLog',
    @level2type = N'COLUMN',
    @level2name = N'SendTime2'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'需要发送时间1',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ApptAttnLog',
    @level2type = N'COLUMN',
    @level2name = N'NeedToSendTime1'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'需要发送时间2',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ApptAttnLog',
    @level2type = N'COLUMN',
    @level2name = N'NeedToSendTime2'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'发送次数',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ApptAttnLog',
    @level2type = N'COLUMN',
    @level2name = N'SendTimes'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'记录创建时间 ',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ApptAttnLog',
    @level2type = N'COLUMN',
    @level2name = N'RecCreateDt'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'记录更新时间',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'ApptAttnLog',
    @level2type = N'COLUMN',
    @level2name = N'RecUpdateDt'